import Vue from 'vue'

Vue.component('m-nav',{
    data(){
        return {
            nav:['首页','商城','我的'],
            red:0
        }
    },
    template:`<div id="nav" class="m-footer">
        <span v-for="(i,index) in nav" :class="red===index?'red':''" @click="red=index">{{i}}</span>
    </div>`
})

